package com.uenpay.im.utilities;

import android.content.Context;
import android.widget.Toast;

public class ToastUtil {
    private static Toast toast;

    public static void showToast(Context context,String msg){
        if(toast==null){
            //创建toast
            toast = Toast.makeText(context,msg,Toast.LENGTH_SHORT);
        }else {
            //更改当前吐司的内容
            toast.setText(msg);
        }
        //最后再show
        toast.show();
    }
}
